class Car {
  constructor(instance) {
    this.instance = instance;
  }

  buildCar() {
    this.instance.show();
  }
}

class Track {
  constructor(instance) {
    this.instance = instance;
  }

  buildCar() {
    this.instance.show();
  }
}

class Part1 {
  constructor(part) {
    this.part = part;
  }

  show() {
    console.log("Part1.show : ", this.part);
  }
}

class Part2 {
  constructor(part) {
    this.part = part;
  }

  show() {
    console.log("Part2.show : ", this.part);
  }
}

const car = new Car(new Part1("part1111!"));
car.buildCar("123123");
